package com.central.game.dao;

import com.central.game.model.VersionInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface VersionDao {

    int versionCount(Map<String, Object> params);


    List<VersionInfo> findVersionList(Map<String, Object> params);

    @Update("update config_version set version = #{version}, sysId = #{sysId}, downUrl = #{downUrl} where id = #{id}")
    void updateVersion(VersionInfo versionInfo);

    @Options(useGeneratedKeys = true, keyProperty = "id")
    @Insert("insert into config_version(version,sysId,downUrl) values(#{version},#{sysId},#{downUrl})")
    void saveVersion(VersionInfo versionInfo);

    @Delete("DELETE FROM config_version WHERE id = #{id}")
    void delVersion(Long id);
}
